package test.check.system.remote;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class Server {
	public void startAgentServer() {
		try {
			ServerSocket server = new ServerSocket(8080);
			while(true) {
				System.out.println("Server is listening...");
				Socket client = server.accept();
				ServerWorker sw = new ServerWorker(client);
				Thread workerThread = new Thread(sw);
				workerThread.start();
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
